Add and Delete Management Routes

In a multi-node deployment, you can add, delete, and show management routes for Multiple Management IP (MMIP) networks.

About this task

The create and delete operations do not cause a high-availability (HA) failover. The route is instantiated on the active node of the cluster. When there is a failover from node 1 to node 2, keepalived ensures the route transitions from node 1 to node 2.

Procedure

  1. To add a management route, run the following command.
    $ efa mgmt route create --src <mmip-vip> --to <dest-cidr> --via <next-hop-ip>
    1. Run the following command to list both IPv4 and IPv6 routes:
      $ efa mgmt route show
      +------------+------------+------------+
      | Route-Src  |  Route-To  | Route-Via  |
      +------------+------------+------------+
      | 2000::1    | ffee::/64  | 2000::2    |
      +------------+------------+------------+
      | 2000::1    | 4000: :/64 | 2000::3    |
      +------------+------------+------------+
      | 10.10.10.1 | 1.1.1.0/24 | 10.10.10.2 |
      +------------+------------+------------+
    2. Run the following command to list IPv4 routes:
      $ efa mgmt route show ipv4
      +------------+---------------+------------+
      | Route-Src  |   Route-To    | Route-Via  |
      +------------+---------------+------------+
      | 10.10.10.1 | 11.11.11.0/24 | 10.10.10.2 |
      +------------+---------------+------------+
      | 10.10.10.1 | 12.12.12.0/24 | 10.10.10.2 |
      +------------+---------------+------------+
    3. Run the following command to list IPv6 routes:
      $ efa mgmt route show ipv6
      +-----------+-----------+-----------+
      | Route-Src | Route-To  | Route-Via |
      +-----------+-----------+-----------+
      | 3000::1   | 4000::/64 | 3000::2   |
      +-----------+-----------+-----------+
      | 3000::1   | 5000::/64 | 3000::2   |
      +-----------+-----------+-----------+
    If a route with the same destination exists, the operation fails. This operation updates the keepalived configuration file on both nodes of the high-availability cluster.
  2. To delete a management route, run the following command.
    $ efa mgmt route delete --src <mmip-vip> --to <dest-cidr> --via <next-hop-ip>
    If a route matching the three parameters does not existing, the operation fails. If a matching route is found, the keepalived configuration file is updated and reloaded on both nodes of the high-availability cluster.
  3. To generate a list of all management routes, run the following command.
    $ efa mgmt route show 
    +-------------+------------------+-------------+ 
    |  Route-Src  |     Route-To     |  Route-Via  | 
    +-------------+------------------+-------------+ 
    | 10.21.30.40 | 192.168.100.0/24 | 10.21.30.41 | 
    +-------------+------------------+-------------+